<template>
  <div class="dashboard-container">
    <div class="dashboard-text publi">
      <img style="float:left" src="@/assets/common/head.jpg" alt="">
      <span>{{ userInfo.username }},你好!</span>
      <p>sdlkgnkojn</p>
    </div>
    <div class="dashboard-fiex">
      <div class="flex-item  right">
        <el-card class="box-card publi">
          <div slot="header" class="clearfix">
            <span class="font">工作日历</span>
          </div>
          <el-calendar v-model="value" />
        </el-card>
      </div>
      <div class="flex-item ">
        <div class="home-right">
          <el-card class="box-card">
            <span class="font">流程申请</span>
            <div class="item">
              <el-button>加班离职</el-button>
              <el-button>请假调休</el-button>
              <el-button>审批列表</el-button>
              <el-button>我的信息</el-button>
            </div>
          </el-card>
          <el-card class="box-card">
            <span class="font">快速开始/便捷导航</span>
            <div class="item">
              <el-button>人事月报</el-button>
              <el-button>考勤查询</el-button>
              <el-button>考情统计</el-button>
              <el-button>员工审核</el-button>
              <el-button>组织架构</el-button>
            </div>
          </el-card>
          <el-card class="box-card">
            <span class="font">帮助链接</span>
            <div class="hlep-item">
              <router-link
                to=""
              ><div />
                入门指南</router-link>
              <router-link
                to=""
              ><div />
                在线帮助手册</router-link>
              <router-link
                to=""
              ><div />
                联系技术支持</router-link>
            </div>
          </el-card>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters, mapState } from 'vuex'

export default {
  name: 'Dashboard',
  data() {
    return {
      activeName: 'second',
      value: ''
    }
  },
  computed: {
    ...mapGetters(['name']),
    ...mapState('user', ['userInfo'])
  }
}
</script>
<style>
section.app-main {
  background-color: #edeff2;
}
.el-card__header {
  margin: 0 5px;
}
.font {
  font-size: 22px;
}
</style>
<style lang="scss" scoped>
.dashboard {
  &-text {
    height: 130px;
    padding: 10px 20px 0 20px;
    background-color: #fff;
    font-size: 25px;
    line-height: 45px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px 7px #dbdbdb;
    img {
      vertical-align: middle;
      padding-right: 15px;
    }
    p {
      font-size: 20px;
      margin: 0;
    }
  }
  &-fiex {
    display: -webkit-flex;
    display: flex;
    .home-right {
      span {
        border-bottom: 4px solid #00a6a6;
        padding-bottom: 8px;
        margin-left: 8px;
      }
      .el-card {
        margin-bottom: 20px;
      }

      .el-button {
        margin: 10px 0px;
        padding: 15px 30px;
        font-size: 16px;
        margin-right: 15px;
      }
      .item {
        width: 85%;
        margin: 20px 0 20px 0;
      }
      .hlep-item {
        display: flex;
        // flex-wrap: wrap;
        align-content: space-between;
        margin: 20px 0 20px 0;
        a {
          flex: 1;
          width: 100px;
          padding-top: 20px;
          text-align: center;
          display: inline-block;
          font-size: 14px;
          &:nth-child(1) div {
            background: url('../../assets/common/icon.png') 5px;
          }
          &:nth-child(2) div {
            background: url('../../assets/common/icon.png') 321px;
          }
          &:nth-child(3) div {
            background: url('../../assets/common/icon.png') 81px;
          }
          div {
            margin: auto;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            margin-bottom: 5px;
            background-color: red;
          }
        }
      }
    }
    .flex-item {
      flex: 2;
      // background-color: #fff;
      margin: 25px 0;
      margin-left: 15px;
    }

    .right {
      flex: 3;
      margin-left: 0px;
    }
  }
  #app .sidebar-container {
    background-color: #2d3a4b !important;
  }
  .publi {
    border-radius: 5px;
    box-shadow: 0px 0px 10px 7px #dbdbdb;
  }
}
</style>
